package ai.zixing.example03;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class Mail implements Cloneable{
    //收件人
    private String receiver;
    //邮件名称
    private String subject;
    //称谓
    private String appellation;
    //邮件内容
    private String context;
    //邮件尾部, 一般是"xxx版权所有"等信息
    private String tail;

    public Mail(AdvTemplate advTemplate) {
        this.subject = advTemplate.getAdvSubject();
        this.context = advTemplate.getAdvContext();
    }


    @Override
    protected Mail clone() {
        try {
           return (Mail) super.clone();
        } catch (CloneNotSupportedException e) {
            return null;
        }
    }
}
